﻿<%@ Control Language="C#" AutoEventWireup="true" Codebehind="BonusManager.ascx.cs"
    Inherits="NCS.Module.Multimedia.Admin.Bonus.BonusManager" %>
<%@ Register Assembly="NCS.FilePickerControl" Namespace="NCS.FilePicker" TagPrefix="cc2" %>
<%@ Register Src="../UserControls/SelectDate.ascx" TagName="SelectDate" TagPrefix="uc1" %>
<%@ Register Src="../UserControls/Editor.ascx" TagName="Editor" TagPrefix="uc1" %>
<%@ Register Assembly="NCS.Library" Namespace="NCS.Library.Controls" TagPrefix="cc1" %>
<%@ Register Assembly="System.Web.Extensions" Namespace="System.Web.UI" TagPrefix="asp" %>
<table width="100%" border="0" cellpadding="0" cellspacing="0" id="tblList" runat="server">
    <tr>
        <td>
            <strong>Từ khóa tìm kiếm</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:TextBox ID="txtkeysearch"
                runat="server" Width="395px"></asp:TextBox></td>
    </tr>
    <tr>
        <td>
            <table border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td valign="top">
                        &nbsp;từ ngày&nbsp;</td>
                    <td valign="top">
                        <uc1:SelectDate ID="SelectDate1" runat="server"></uc1:SelectDate>
                    </td>
                    <td valign="top">
                        &nbsp;đến ngày&nbsp;</td>
                    <td valign="top">
                        <uc1:SelectDate ID="SelectDate2" runat="server"></uc1:SelectDate>
                    </td>
                    <td style="padding-left: 20px;">
                        <asp:Button ID="btnSearch" runat="server" Text="Tìm kiếm" CssClass="Button" OnClick="btnSearch_Click"
                            CausesValidation="False" /></td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td>
            <cc1:GridView ID="dtgBonusList" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                BorderColor="Gainsboro" BorderStyle="Solid" BorderWidth="1px" CellPadding="2"
                CssClass="Grid" PageSize="15" Width="100%" OnRowCommand="dtgBonusList_RowCommand"
                OnRowDataBound="dtgBonusList_RowDataBound" OnRowDeleting="dtgPicList_RowDeleting">
                <AlternatingRowStyle CssClass="Grid_Raw2" />
                <RowStyle CssClass="Grid_Raw1" />
                <HeaderStyle Font-Bold="True" CssClass="Grid_Top"></HeaderStyle>
                <Columns>
                    <asp:BoundField Visible="true" DataField="BonusID" HeaderText="ID">
                        <headerstyle width="0%"></headerstyle>
                    </asp:BoundField>
                    <asp:TemplateField>
                        <headerstyle horizontalalign="Center"></headerstyle>
                        <itemtemplate>
							<asp:CheckBox ID="chkxml" runat="server"></asp:CheckBox>
						</itemtemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="T&#234;n Bonus">
                        <headerstyle horizontalalign="Center"></headerstyle>
                        <itemtemplate>
									<asp:HyperLink ID="lnkHeadline" runat="server"></asp:HyperLink>
								</itemtemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <headerstyle horizontalalign="Center" width="120px"></headerstyle>
                        <itemstyle horizontalalign="Center"></itemstyle>
                        <headertemplate>
									<asp:Button ID="cmdupdatestatus" CausesValidation="false" runat="server" Width="60" CommandName="updatestatus"
										CssClass="Button" Text="Trạng thái"></asp:Button>
								</headertemplate>
                        <itemtemplate>
									<asp:DropDownList ID="dropStatus" runat="server" Width="80">
									    <asp:ListItem Text="Ẩn" Value="0"></asp:ListItem>
									    <asp:ListItem Text="Hiển thị" Value="1"></asp:ListItem>
									</asp:DropDownList>
								</itemtemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <headerstyle horizontalalign="Center" width="70px"></headerstyle>
                        <itemstyle horizontalalign="Center"></itemstyle>
                        <headertemplate>
									<asp:Button ID="cmdUpdateIndex" CausesValidation="false" runat="server" Width="60" CommandName="updatepriority"
										CssClass="Button" Text="Thứ tự"></asp:Button>
								</headertemplate>
                        <itemtemplate>
									<asp:DropDownList ID="dropIndex" runat="server" Width="60">
									</asp:DropDownList>
								</itemtemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <headerstyle horizontalalign="Center" width="80px"></headerstyle>
                        <itemstyle horizontalalign="Center"></itemstyle>
                        <headertemplate>
									<asp:Button ID="cmdUpdateRank" CausesValidation="false" runat="server" Width="60" CommandName="updaterank"
										CssClass="Button" Text="Loại"></asp:Button>
								</headertemplate>
                        <itemtemplate>
									<asp:DropDownList ID="dropRank" runat="server" Width="80">
									    <asp:ListItem Text="Bình thường" Value="1"></asp:ListItem>
									    <asp:ListItem Text="Nổi bật" Value="2"></asp:ListItem>
									</asp:DropDownList>
								</itemtemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Thao t&#225;c">
                        <headerstyle horizontalalign="Center" width="150px"></headerstyle>
                        <itemstyle horizontalalign="Center"></itemstyle>
                        <itemtemplate>									
									<asp:Button ID="cmdEdit" CausesValidation="false" runat="server" CssClass="Button" CommandName="edit"
										Text="Sửa" CommandArgument='<%# Eval("BonusID") %>'></asp:Button>
									<asp:Button ID="cmdDel" CausesValidation="false" runat="server" CssClass="Button" CommandName="delete"
										Text="Xóa" CommandArgument='<%# Eval("BonusID") %>'></asp:Button>									
									
								</itemtemplate>
                    </asp:TemplateField>
                </Columns>
            </cc1:GridView>
        </td>
    </tr>
    <tr>
        <td>
            <br />
            <table border="0" cellpadding="5" cellspacing="3" width="100%"  runat="server">
                <tr>
                    <td colspan="2" align="center">
                        <asp:Label ID="lbupdate" runat="server"></asp:Label></td>
                </tr>
                <tr>
                    <td>
                        Tên Bonus &nbsp;&nbsp;
                    </td>
                    <td>
                        <asp:TextBox ID="txtBonusName" Width="248px" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        Thuộc Album</td>
                    <td>
                        <asp:DropDownList ID="dropCateBonus" runat="server" AutoPostBack="True" DataTextField="CateBonusName"
                            DataValueField="CateBonusID" Width="352px">
                        </asp:DropDownList></td>
                </tr>
                <tr>
                    <td>
                        Avatar&nbsp;</td>
                    <td>
                        &nbsp;<cc2:FilePicker ID="txtAvatar" runat="server" fpPopupURL="/FilePicker/TUFilePicker.aspx"></cc2:FilePicker>
                        <asp:RequiredFieldValidator ID="chknone" ControlToValidate="txtAvatar" runat="server">Chưa có ảnh</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td>
                        Nội dung chi tiết</td>
                    <td>
                        &nbsp;<asp:TextBox ID="txtDetail" runat="server" Rows="10" TextMode="multiLine" Width="500px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        Copy link</td>
                    <td>
                        <asp:TextBox ID="txtCopyLink" runat="server" Width="248px"></asp:TextBox></td>
                </tr>
                <tr>
                    <td style="height: 25px">
                        Upload Link</td>
                    <td style="height: 25px">
                        <cc2:FilePicker ID="txtUploadLink" runat="server" fpPopupURL="/FilePicker/TUFilePicker.aspx"></cc2:FilePicker></td>
                </tr>
                <tr>
                    <td style="height: 25px">
                        Kiểu Bonus</td>
                    <td style="height: 25px">
                        <asp:DropDownList ID="dropType" runat="server">
                            <asp:ListItem Value="0">Trailer</asp:ListItem>
                            <asp:ListItem Value="1">SoundTrack</asp:ListItem>
                        </asp:DropDownList></td>
                </tr>
                <tr>
                    <td style="height: 10px;" colspan="2">
                    </td>
                </tr>
                <tr>
                    <td style="height: 25px">
                    </td>
                    <td style="height: 25px">
                        <asp:CheckBox ID="chkcomment" runat="server" Text="Cho đóng góp ý kiến"></asp:CheckBox></td>
                </tr>
                <tr>
                    <td style="height: 5px;" colspan="2">
                    </td>
                </tr>
                <tr>
                    <td style="height: 25px">
                    </td>
                    <td>
                        <asp:CheckBox ID="chkalbum" Checked="true" runat="server" Text="Hiển thị" /></td>
                </tr>
                <tr>
                    <td style="height: 5px;" colspan="2">
                    </td>
                </tr>
                <tr>
                    <td>
                        Loại bonus</td>
                    <td>
                        <asp:RadioButtonList ID="rdtype" RepeatDirection="horizontal" runat="server">
                            <asp:ListItem Text="Bình thường" Value="1" Selected="true"></asp:ListItem>
                            <asp:ListItem Text="Nổi bật" Value="2"></asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
                <tr>
                    <td style="height: 5px;" colspan="2">
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td>
                        <asp:Button ID="btnAdd" runat="server" CssClass="Button" Text="Thêm mới" OnClick="btnAdd_Click" />
                        <asp:Button ID="btnUpdate" runat="server" CssClass="Button" Text="Cập nhật" OnClick="btnUpdate_Click" />
                    </td>
                </tr>
                <tr>
                    <td style="height: 25px">
                    </td>
                    <td>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td>
        </td>
    </tr>
    <tr>
        <td style="text-align: right; padding-right: 20px;display:none">
            <asp:Button ID="btnAddNew" runat="server" CssClass="Button" Text="Thêm mới" OnClick="btnAdd_Click" />
            <asp:Button ID="btnbuilXML" runat="server" CssClass="Button" Text="Chuyển sang XML"
                ToolTip="Chuyển danh sách video sang XML" OnClick="btnbuilXML_Click" CausesValidation="False" /></td>
    </tr>
</table>
